public class MyNative {
	public void showParms(String s, int i, boolean b) {
		showParms0(s, i, b);

	}

	public int hypotenuse(int a, int b) {
		return hypotenuse0(a, b);
	}

	public void setArray(boolean[] ba) {
		for (int i = 0; i < ba.length; i++)
			ba[i] = true;
		setArray0(ba);
	}

	public void showStrings(String[] sa) {
		showStrings0(sa);
	}

	public String[] getStrings() {
		return getStrings0();
	}

	private native void showParms0(String s, int i, boolean b);

	private native int hypotenuse0(int a, int b);

	private native void setArray0(boolean[] ba);

	private native void showStrings0(String[] sa);

	private native String[] getStrings0();

	static {
		System.loadLibrary("MyNative");
	}

	public static void main(String[] args) {
		MyNative obj = new MyNative();
		obj.showParms("Hello", 23, true);
		obj.showParms("World", 34, false);
		System.out.println(obj.hypotenuse(3, 4));
		System.out.println(obj.hypotenuse(9, 12));
		boolean[] ba = new boolean[5];
		obj.setArray(ba);
		for (int i = 0; i < ba.length; i++)
			System.out.println(ba[i]);
		String[] sa = new String[] { "Hello,", "world!", "JNI", "is", "fun." };
		obj.showStrings(sa);
		obj.showStrings(obj.getStrings());
	}
}
